package com.woniu.command.workingProcedureTypeCommand;

import com.woniu.command.Command;
import com.woniu.command.handler.WorkingProcedureTypeCommandHandler;
import com.woniu.utils.ApplicationContextHolder;

public class DeleteWorkingProcedureTypeCommand implements Command<Long,Integer> {

    private WorkingProcedureTypeCommandHandler handler;
    public DeleteWorkingProcedureTypeCommand(){
        this.handler = ApplicationContextHolder.getApplicationContext()
                .getBean(WorkingProcedureTypeCommandHandler.class);
    }
    @Override
    public Integer  execute(Long id) {
        return handler.deleteWorkingProcedureTypeById(id);
    }
}
